// proxy 对象

const person = {
    name: 'jqb',
    age: 18
}

const personProxy = new Proxy(person, {
    get(target, property) {
        return property in target ? target[property] : undefined
    },
    set(target, property, value) {
        console.log(target, property, value)
        target[property] = value
    }
})

// personProxy.gender = true

// console.log(personProxy.name)
// console.log(personProxy.sex)

